package com.leon.learnenginespace.drools.utils.operation.impl;

import com.leon.learnenginespace.drools.utils.operation.IOperationBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;

/**
 * 是空
 * @author DJ032474
 */
@Component
public class IsEmptyOperation implements IOperationBase {
    @Autowired
    private EqualsOperation equalsOperation;
    /**
     * v1 isEmpty
     * @param v 值
     * @return
     */
    @Override
    public Boolean operation(String dataType,Object ...v) {
        Object v1 = v[0];
        return ObjectUtils.isEmpty(v1);
    }
}
